-- Lamp made with glass and lava 
--

local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)

-- Load support for MT game translation.
local S = minetest.get_translator(modname)


minetest.register_node(modname..":lava", {
	description = S("Lava Lamp"),
	drawtype = "glasslike",
	-- tiles = {"default_lava.png^default_glass.png"},
	tiles = {
		{
			name = "glass_lamps_lava.png",
			animation = {
				type = "vertical_frames",
				aspect_w = 16,
				aspect_h = 16,
				length = 3.0,
			},
		},
	},
	paramtype = "light",
	sunlight_propagates = true,
	is_ground_content = false,
	groups = {cracky = 3, oddly_breakable_by_hand = 3},
	sounds = default.node_sound_glass_defaults(),
	light_source = default.LIGHT_MAX - 1,
})


if minetest.get_modpath('default') and minetest.get_modpath('bucket') then 
  minetest.register_craft({
    output = modname..":lava",
    recipe = {
          {"default:glass", "default:glass","default:glass"},
          {"default:glass", "bucket:bucket_lava","default:glass"},
          {"default:glass", "default:glass","default:glass"},
        },
    replacements = {
      {"bucket:bucket_lava", "bucket:bucket_empty"}
    }
  })
end
